#ifndef _HY_CHAT_SERVICE_H_
#define _HY_CHAT_SERVICE_H_

#include <iostream>

#include "hy_auth_net_module.h"

class hy_hy_service : public hy_service_base
{
public:
	hy_hy_service():_port(3235){}
	~hy_hy_service(){}

	virtual hy_err_t init()
	{
		_net.init();
		return hy_right;
	}

	virtual hy_err_t unit()
	{
		_net.unit();
		return hy_right;
	}

	virtual void run()
	{
		_net.add_accept(NULL,_port);
		_net.run();
	}

	virtual void stop()
	{
		_net.stop();
	}

protected:
	hy_u32_t	_port;

	hy_auth_net_module	_net;
};
#endif  //_HY_CHAT_SERVICE_H_
